/**
 * 认证相关类型定义
 */

/**
 * 用户信息
 */
export interface User {
  userId: number
  username: string
  email: string
  displayName: string
  roles?: string[]
  permissions?: string[]
  createdAt?: string
  lastLoginAt?: string
  isLocked?: boolean
}

/**
 * 登录请求
 */
export interface LoginRequest {
  username: string
  password: string
  rememberMe?: boolean
}

/**
 * 登录响应
 */
export interface LoginResponse {
  accessToken: string
  refreshToken: string
  tokenType: string
  expiresIn: number
  user: User
}

/**
 * 修改密码请求
 */
export interface ChangePasswordRequest {
  oldPassword: string
  newPassword: string
}

/**
 * Token 刷新请求
 */
export interface RefreshTokenRequest {
  refreshToken: string
}

/**
 * Token 刷新响应
 */
export interface RefreshTokenResponse {
  accessToken: string
  refreshToken: string
  tokenType: string
  expiresIn: number
}
